package com.example.chat.agent.controller;

import com.example.chat.agent.service.StoreService;
import com.example.chat.common.utils.ResultUtil;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

@RestController
@RequestMapping("/store")
public class StoreController {
    @Resource
    StoreService storeService;

    @PostMapping("/load/file")
    public ResultUtil<Void> saveDoc(MultipartFile file){
        storeService.loadFile(file);
        return ResultUtil.ok();
    }

}
